]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: call this.updated() when a new message is added to a notification
authorJoost Verdoorn <jpverdoorn@gmail.com>
Fri, 13 Apr 2012 17:05:51 +0000 (19:05 +0200)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Tue, 17 Apr 2012 03:29:07 +0000 (23:29 -0400)
When receiving another message or responding in a new expanded chat
notification that has no prior chat history, the notification moved down
below the edge of the screen instead of expanding up, making part of it
invisible. Avoid this by making sure the notification's position is updated.

https://bugzilla.gnome.org/show_bug.cgi?id=661944

js/ui/messageTray.js
js/ui/telepathyClient.js

index 502b9f30a947499301a13a43f3021025c0d56293..fab17403d37d7fb666ba7a1e53470b738831b21f 100644 (file)
@@ -577,7 +577,7 @@ const Notification = new Lang.Class({
 
         if (params.body)
             this.addBody(params.body, params.bodyMarkup);
-        this._updated();
+        this.updated();
     },
 
     setIconVisible: function(visible) {
@@ -616,7 +616,7 @@ const Notification = new Lang.Class({
         }
 
         this._contentArea.add(actor, style ? style : {});
-        this._updated();
+        this.updated();
     },
 
     // addBody:
@@ -679,7 +679,7 @@ const Notification = new Lang.Class({
         this._table.add_style_class_name('multi-line-notification');
         this._table.add(this._actionArea, props);
         this._updateLastColumnSettings();
-        this._updated();
+        this.updated();
     },
 
     _updateLastColumnSettings: function() {
@@ -760,7 +760,7 @@ const Notification = new Lang.Class({
         this._buttonFocusManager.add_group(this._buttonBox);
         button.connect('clicked', Lang.bind(this, this._onActionInvoked, id));
 
-        this._updated();
+        this.updated();
     },
 
     setUrgency: function(urgency) {
@@ -856,7 +856,7 @@ const Notification = new Lang.Class({
                                         if (this._canExpandContent()) {
                                             this._addBannerBody();
                                             this._table.add_style_class_name('multi-line-notification');
-                                            this._updated();
+                                            this.updated();
                                         }
                                         return false;
                                      }));
@@ -867,7 +867,7 @@ const Notification = new Lang.Class({
                (!this._titleFitsInBannerMode && !this._table.has_style_class_name('multi-line-notification'));
     },
 
-    _updated: function() {
+    updated: function() {
         if (this.expanded)
             this.expand(false);
     },
index e110c606cee5fc17d700b0b9ae7043825c0c3cad..b705c7ad5b8ea96c85535bde4692ceeb8acb4b45 100644 (file)
@@ -853,6 +853,8 @@ const ChatNotification = new Lang.Class({
 
         this._lastGroupActor.add(body, props.childProps);
 
+        this.updated();
+
         let timestamp = props.timestamp;
         this._history.unshift({ actor: body, time: timestamp,
                                 realMessage: group != 'meta' });